
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.common;

import com.hlkj.framework.common.exception.IErrorCode;
import com.hlkj.pay.common.constants.ResultCodeConstant;

/**
 * @author lyc
 */

public enum PayResultCode implements IErrorCode {
    PAY_WAY_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+1, "支付方式不存在"),
    PAY_WAY_NOT_EFFECT( ResultCodeConstant.PAY_PREFIX+2, "支付方式无效"),
    PAY_WAY_EXITS( ResultCodeConstant.PAY_PREFIX+3, "支付方式已存在"),
    
    PAY_WAY_CODE_ERROR( ResultCodeConstant.PAY_PREFIX+4, "支付方式编码格式错误,以Qr、Scan、H5、APP、Pub、Lite结尾"),
    PAY_CHANNEL_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+101, "支付通道不存在"),
    PAY_CHANNEL_EXITS( ResultCodeConstant.PAY_PREFIX+102, "支付通道已存在"),
    PAY_CHANNEL_WAY_NOT_ERROR( ResultCodeConstant.PAY_PREFIX+103, "支付通道未配置支付方式"),
    PAY_CHANNEL_WAY_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+104, "支付通道%s,不存在该支付方式%s"),
    PAY_CHANNEL_FEE_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+105, "支付通道,费率不存在"),
    PAY_CHANNEL_CONFIG_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+106, "支付通道,配置不存在"),
    PAY_CHANNEL_CONFIG_ERROR( ResultCodeConstant.PAY_PREFIX+107, "支付通道%s,配置错误"),
    PROVIDER_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+201, "服务商不存在"),
    PROVIDER_EXITS( ResultCodeConstant.PAY_PREFIX+202, "服务商已存在"),
    PROVIDER_CODE_ERROR( ResultCodeConstant.PAY_PREFIX+203, "服务商编号生成失败,请稍后再试"),
    PROVIDER_CHANNEL_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+204, "服务商通道配置不存在"),
    PROVIDER_CHANNEL_NOT_EFFECT( ResultCodeConstant.PAY_PREFIX+205, "服务商未配置该通道"),
    DEFAULT_FEE_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+301, "默认费率为空"),
    STEP_FEE_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+302, "阶梯费率为空"),
    SENIOR_FEE_NOT_EXITS( ResultCodeConstant.PAY_PREFIX+303, "高级配置为空"),
    ;

    /**
     * 错误码
     */
    private final Integer code;
    /**
     * 错误提示
     */
    private final String msg;

    PayResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

}
